// cf-249d
// 题意：
//
// 题解：
//
// ml:run = $bin < input
#include <cstdio>
#include <algorithm>

using ll = long long;
struct pos { ll x, y; };

bool operator<(pos const& a, pos const& b)
{
    return a.x < b.x || (a.x == b.x && a.y > b.y);
}

int const maxn = 100007;
pos p[maxn];
ll r[maxn];
int n, a, b, c, d, len = 0;

int main()
{
    std::scanf("%d%d/%d%d/%d", &n, &a, &b, &c, &d);
    for (int i = 1, x, y; i <= n; i++) {
        std::scanf("%d%d", &x, &y);
        p[i].y = (long long)b * y - (long long)a * x;
        p[i].x = (long long)c * x - (long long)d * y;
        if (p[i].y <= 0 || p[i].x <= 0) { i--; n--; }
    }
    std::sort(p, p + 1 + n);
    for (int i = 1; i <= n; i++)
        if (p[i].y > r[len])
            r[++len] = p[i].y;
        else
            r[std::lower_bound(r + 1, r + 1 + len, p[i].y) - r] = p[i].y;
    std::printf("%d\n", len);
}

